package cn.ydw.community.dao;

import cn.ydw.community.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author dw
 * @since 2020-10-18
 */
@Mapper
public interface CommentDao extends BaseMapper<Comment> {

    /**
     * 根据实体类型和ID查询评论
     */
    List<Comment> selectCommentByEntity(Page page, @Param("entityType") Integer entityType, @Param("entityId")Integer entityId);

}
